import {RouteRecordRaw} from 'vue-router'
export const routes:Array<RouteRecordRaw> = [
  {
    path: '/',
    name: '_home',
    component: () => import('../views/layout/layout.vue'),
    redirect: '/home',
    meta: { title: '主页',menuType: 1},
    children: [
      {
        path: "/home",
        name: "Home",
        meta: { title: '数据统计',icon:'icon-tongji',keepAlive:true},
        component: () => import('../views/home/index.vue'),
      },{
        path: "/employee",
        name: "employee",
        meta: { title: '部门员工',icon:'icon-icon-test',keepAlive:true},
        redirect: "/employee/user",
        children:[
          {
            path: "/employee/user",
            name: "user",
            meta: { title: '员工管理',icon:'icon-icon-test',keepAlive:true },
            component: () => import('../views/system/employee/user/index.vue'),
          },{
            path: "/employee/role",
            name: "role",
            meta: { title: '角色管理',icon:'icon-icon-test',keepAlive:true },
            component: () => import('../views/system/employee/role/index.vue'),
          },{
            path: "/employee/department",
            name: "department",
            meta: { title: '部门管理',icon:'icon-icon-test',keepAlive:true },
            component: () => import('../views/system/employee/department/index.vue'),
          }
        ]
      },{
        path:"/system",
        name:"system",
        meta: { title: '系统设置',icon:'icon-icon-test',keepAlive:true},
        redirect: "/system/menu",
        children:[
          {
            path: "/system/menu",
            name: "systemMenu",
            meta: { title: '菜单管理',icon:'icon-icon-test',keepAlive:true },
            component: () => import('../views/system/menu/menu-list.vue'),
          }
        ]
      }
    ]
  },{
      path: '/login',
      name: 'Login',
      component: () => import('../views/login/login.vue'),
      meta: {
        title: '登录',
        hideInMenu: true,
      }
  },{
    path: '/404',
    name: '404',
    meta: { title: '404错误' },
    component: () => import('../views/404/404.vue')
  }
]